#include<stdio.h>
int main(int argc,char *argv[])
{
	int a,b,c;int max;int temp;
	while(scanf("%d %d %d",&a,&b,&c)!=EOF)
	{
		if(a>b)
		{
			temp=a;
			a=b;
			b=temp;
		}
		if(b>c)
		{
			temp=b;
			b=c;
			c=temp;
		}
		if(a>b)
		{
			temp=a;
			a=b;
			b=temp;
		}
		if(a==0&&b==0&&c==0)
		{
			break;
		}
		if(a*a+b*b==c*c)
		{
			printf("right\n");
		}
		else
		{
			printf("wrong\n");
		}
	}
	return 0;
}
